﻿
@{
    ViewBag.Title = "JOBSCHEDULE";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section scripts{
<script src="/Content/js/viewModel/com.viewModel.edit.js"></script>
<script type="text/javascript">
    var viewModel = function(data){ 
        var self = this;
        com.viewModel.edit.apply(self,arguments);
            this.grid0.size={w:8,h:177};
    } 
    var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
    ko.bindingViewModel(new viewModel(data));
</script>
}

<div class="z-toolbar">
    <a id="a_save" href="#" plain="true" class="easyui-linkbutton" icon="icon-save" data-bind="click:readonly()?null:saveClick,linkbuttonDisable:readonly" title="保存">保存</a>
    <a id="a_undo" href="#" plain="true" class="easyui-linkbutton" icon="icon-undo" data-bind="click:readonly()?null:rejectClick,linkbuttonDisable:readonly" title="撤消">撤消</a>
    <a id="a_audit" href="#" plain="true" class="easyui-linkbutton" icon="icon-user-accept" data-bind="click:auditClick,easyuiLinkbutton:approveButton" title="审核">审核</a>
    <a id="a_printer" href="#" plain="true" class="easyui-linkbutton" icon="icon-printer" title="打印" data-bind="click:printClick">打印</a>
    <div class="datagrid-btn-separator"></div>
    <a id="a_other" href="#" class="easyui-splitbutton" data-options="menu:'#divother',iconCls:'icon-application_go'" title="其他">其他</a>
    <div class="datagrid-btn-separator"></div>
    <a id="a_first" href="#" plain="true" class="easyui-linkbutton" icon="icon-resultset_first" data-bind="click:firstClick,linkbuttonEnable:pageData.scrollKeys.firstEnable" title="第一条"></a> 
    <a id="a_previous" href="#" plain="true" class="easyui-linkbutton" icon="icon-resultset_previous" data-bind="click:previousClick,linkbuttonEnable:pageData.scrollKeys.previousEnable" title="上一条"></a> 
    <a id="a_next" href="#" plain="true" class="easyui-linkbutton" icon="icon-resultset_next" data-bind="click:nextClick,linkbuttonEnable:pageData.scrollKeys.nextEnable" title="下一条"></a> 
    <a id="a_last" href="#" plain="true" class="easyui-linkbutton" icon="icon-resultset_last" data-bind="click:lastClick,linkbuttonEnable:pageData.scrollKeys.lastEnable" title="最后一条"></a> 
</div>

<div id="divother" style="width:100px; display:none;">
    <div data-options="iconCls:'icon-add'">新增</div>
    <div data-options="iconCls:'icon-cross'">删除</div>
    <div data-options="iconCls:'icon-arrow_refresh'">刷新</div>
</div>  

<div id="master" class="container_12" data-bind="inputwidth:0.9">
    <div class="grid_1 lbl">SCHCODE</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.SCHCODE ,readOnly:readonly" class="z-txt " /></div>
    <div class="grid_1 lbl">WORKLINE</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.WORKLINE ,readOnly:readonly" class="z-txt " /></div>
    <div class="grid_1 lbl">SCHSEQNO</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.SCHSEQNO ,readOnly:readonly" class="z-txt " /></div>
    
    <div class="clear"></div>
    
    <div class="grid_1 lbl">PLANSOUR</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.PLANSOUR ,readOnly:readonly" class="z-txt " /></div>
    <div class="grid_1 lbl">PROMATCODE</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.PROMATCODE ,readOnly:readonly" class="z-txt " /></div>
    <div class="grid_1 lbl">PROMULA</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.PROMULA ,readOnly:readonly" class="z-txt " /></div>
    
    <div class="clear"></div>
    
    <div class="grid_1 lbl">CREADATE</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.CREADATE ,readOnly:readonly" class="z-txt " /></div>
    <div class="grid_1 lbl">CREATOR</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.CREATOR ,readOnly:readonly" class="z-txt " /></div>
    <div class="grid_1 lbl">ORDERNO</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.ORDERNO ,readOnly:readonly" class="z-txt " /></div>
    
    <div class="clear"></div>
    
    <div class="grid_1 lbl">PBILL</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.PBILL ,readOnly:readonly" class="z-txt " /></div>
    <div class="grid_1 lbl">PLANQTY</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.PLANQTY ,readOnly:readonly" class="z-txt " /></div>
    <div class="grid_1 lbl">STARTQTY</div>
    <div class="grid_3 val"><input type="text" data-bind="value:pageData.form.STARTQTY ,readOnly:readonly" class="z-txt " /></div>

    <div class="clear"></div>
</div>

<div id="tt" class="easyui-tabs">  
    <div title="注册SN">
        <table data-bind="datagrid:grid0">
            <thead>
                <tr> 
                    <th field="SCHCODE"		sortable="true"	align="left"	width="80" editor="text" >SCHCODE</th>
                    <th field="PROSN"		sortable="true"	align="left"	width="80" editor="text" >PROSN</th>
                    <th field="DESCRIPTION"		sortable="true"	align="left"	width="80" editor="text" >DESCRIPTION</th>
                </tr>
            </thead>
        </table>
            
        <div id="gridtb0">
            <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" data-bind="click:readonly()?null:grid0.addRowClick,linkbuttonDisable:readonly">新增</a>
            <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-bind="click:readonly()?null:grid0.onClickRow,linkbuttonDisable:readonly">编辑</a>
            <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" data-bind="click:readonly()?null:grid0.removeRowClick,linkbuttonDisable:readonly">删除</a>
        </div>  
    </div>
</div>
